<template>
  <div class="full">
    <div
      class="w_full p_10 border_box flex_row_between mb_10 bgc_1a396b78 border_radius_10 p_5" 
      v-for="(item, index) in sheepList" :key="index"
    >
      <!-- 头像 -->
      <div class="w_30_p aspect_ratio_7_8 border_radius_10 p_10" >
        <img 
          class="w_full border_radius_5 cursor response_img" 
          :src="item.img" alt=""
        >
      </div>

      <!-- 文字信息 -->
      <div class="w_70_p flex_column_start pl_20 cursor">
        <div class="text_1 color_green">RFID: {{ item.rfid }}</div>
        <div class="text_1 color_fff">种羊场: {{ item.farmName }}</div>
        <div class="text_1 color_fff">等级: {{ formatLevel(item.leaveType) }}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    name: ''
  },
  data() {
    return {
      sheepList: [],

      sheepList1: [
        { rfid: 'E2801191A00000001JSDYB991', img: require('@/assets/images/sheepList/0.jpg')},
        { rfid: 'E2801191A00000001JSDID921', img: require('@/assets/images/sheepList/1.jpg')},
        { rfid: 'E2801191A00000001JSDYB233', img: require('@/assets/images/sheepList/3.jpg')},
        { rfid: 'E2801191A00000001JSDKJ981', img: require('@/assets/images/sheepList/4.jpg')}
      ],
    }
  },

  mounted() {
    initSheepList(this.name)
  },

  methods: {
    initSheepList(name) {
      if (name == '乌力吉') {
        this.sheepList = this.sheepList1
      }
    }
  }
}
</script>